package com.hxkj.client.service;

import com.hxkj.domain.po.Site;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;


/**
 * @author zzx
 * @create 2018-05-23 11:58
 * @desc 站点对外接口
 **/

@FeignClient(name = "cms-management")
public interface SiteServiceClient {
    /**
     * 获取站点列表
     *
     * @param parameterDataStruct 站点信息 和 分页信息
     * @return 翻页数据
     * @throws Exception
     */
    @RequestMapping(value = "/site/getlist", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultPageStruct<Site> getList(@RequestBody ParameterDataStruct<Site> parameterDataStruct)
            throws Exception;


    /**
     * 获取站点切换列表
     *
     * @param
     * @return 翻页数据
     * @throws Exception
     */
    @RequestMapping(value = "/site/getswitcherlist", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultDataStruct<List<Site>> getSwitcherList(@RequestBody Site site) throws Exception;

    /**
     * 获取单一用户
     *
     * @param site
     * @return 用户信息
     * @throws Exception
     */
    @RequestMapping(value = "/site/get", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultDataStruct<Site> getSite(@RequestBody Site site) throws Exception;

    /**
     * 新增站点
     *
     * @param site 站点信息
     * @throws Exception
     */
    @RequestMapping(value = "/site/save", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultMessageStruct saveSite(@RequestBody Site site) throws Exception;

    /**
     * 删除站点
     *
     * @param site 站点
     * @throws Exception
     */
    @RequestMapping(value = "/site/remove", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultMessageStruct deleteSite(@RequestBody Site site) throws Exception;

    /**
     * 修改站点
     *
     * @param site 站点信息
     * @throws Exception
     */
    @RequestMapping(value = "/site/modify", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultMessageStruct updateSite(@RequestBody Site site) throws Exception;


    /**
     * 站点排序
     *
     * @param site 站点id 数组信息
     * @throws Exception
     */
    @RequestMapping(value = "/site/sort", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    public ResultMessageStruct SiteSort(@RequestBody Site site) throws Exception;

    @RequestMapping(value = "/site/getAllSite", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    List<Site> getAllSite(@RequestBody Site site) throws Exception;

    @RequestMapping(value = "/site/getSiteLogo", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    String getSiteLogo(@RequestBody Long siteId) throws Exception;

    /**
     * 获取站点列表
     *
     * @param parameterDataStruct 站点信息 和 分页信息
     * @return 翻页数据
     * @throws Exception
     */
    @RequestMapping(value = "/site/getsiteinfolist", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    List<Site> getSiteInfoList(@RequestBody ParameterDataStruct<Site> parameterDataStruct) throws Exception;
}
